package springfox.documentation;


import lombok.AccessLevel;
import lombok.NoArgsConstructor;

import java.lang.reflect.Field;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class BeanUtils {

    public static Object getFieldValue(Object object, String propertyName) {
        try {
            Field field = object.getClass().getDeclaredField(propertyName);
            field.setAccessible(true);

            return field.get(object);
        } catch (Exception e) {
        }
        return null;
    }
}
